<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>计算机二级MS Office真题选择系统</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background-color: #f0f2f5;
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .container {
            background: white;
            padding: 2rem 3rem;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: center;
        }

        h1 {
            color: #2c3e50;
            margin-bottom: 2rem;
        }

        .exam-select {
            width: 350px;
            padding: 12px;
            font-size: 16px;
            border: 2px solid #3498db;
            border-radius: 6px;
            appearance: none;
            background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233498db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 12px center;
            background-size: 20px;
            margin-bottom: 1rem;
        }

        .start-btn {
            padding: 12px 30px;
            font-size: 16px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .start-btn:disabled {
            background-color: #bdc3c7;
            cursor: not-allowed;
        }

        .start-btn:hover:not(:disabled) {
            background-color: #2980b9;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
        }

        .selected-info {
            margin-top: 1rem;
            color: #27ae60;
            font-weight: bold;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>请选择真题试卷</h1>
        <select id="paperSelector" class="exam-select">
            <option value="">-- 请选择真题卷号 --</option>
        </select>
        <div>
            <button id="startBtn" class="start-btn" disabled>开始测试</button>
        </div>
        <div id="selectedInfo" class="selected-info"></div>
    </div>

    <script>
        // 模拟真题卷数据（可根据实际需求扩展）
        const totalPapers = 10; // 共10套真题
        
        // 动态生成选项
        const selector = document.getElementById('paperSelector');
        for (let i = 1; i <= totalPapers; i++) {
            const option = document.createElement('option');
            option.value = i;
            option.textContent = `计算机二级MS Office真题卷${i}`;
            selector.appendChild(option);
        }

        // 交互逻辑
        const startBtn = document.getElementById('startBtn');
        const infoDiv = document.getElementById('selectedInfo');

        selector.addEventListener('change', function() {
            if (this.value) {
                startBtn.disabled = false;
                infoDiv.textContent = `已选择：真题卷${this.value}`;
            } else {
                startBtn.disabled = true;
                infoDiv.textContent = "";
            }
        });

        startBtn.addEventListener('click', function() {
            const selectedPaper = selector.value;
            if (selectedPaper) {
                // 这里可以替换为实际跳转逻辑
                alert(`即将进入 真题卷${selectedPaper} 的测试页面`);
                // 实际使用时替换为：
                window.location.href = `allProblem${selectedPaper}.html`;
            }
        });
    </script>
</body>
</html>